%% $Id: xy.sty,v 2.12 1994/10/25 11:34:25 kris Exp kris $
%%
%% ``XY-pic as LaTeX 2.09 style option and LaTeX 2e package''.
%% Copyright (c) 1993-1994	Kristoffer H. Rose	<kris@diku.dk>
%%
%% This file is part of the XY-pic package for graphs and diagrams in TeX.
%% See the companion README and INSTALL files for further information.
%% Copyright (c) 1991-1994	Kristoffer H. Rose	<kris@diku.dk>
%%
%% The XY-pic package is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by the
%% Free Software Foundation; either version 2 of the License, or (at your
%% option) any later version.
%%
%% The XY-pic package is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
%% or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
%% for more details.
%%
%% You should have received a copy of the GNU General Public License along
%% with this package; if not, write to the Free Software Foundation, Inc.,
%% 675 Mass Ave, Cambridge, MA 02139, USA.

% Load XY-pic with catcode of @ set as it will be in user text:
\count255=\the\catcode`\@ {\catcode`\@=11 \xdef\xystycatcode{\the\count255}}
\makeatother
\input xy
\catcode`\@=\xystycatcode

% That is all unless this is called as a LaTeX2e `native mode' package.  Is
% there an official way to check this?  Anyway, this seems to work:
\makeatletter
\ifx\if@compatibility\undefined \catcode`\@=\xystycatcode\endinput \fi
\if@compatibility \catcode`\@=\xystycatcode\endinput \fi
\catcode`\@=\xystycatcode

% Ensure that we are *really* running LaTeX2e...
\NeedsTeXFormat{LaTeX2e}

% This file provides XY-pic!
\edef\next{%
 \noexpand\ProvidesPackage{xy}[\xydate\space XY-pic version \xyversion]}\next

% Recognise standard LaTeX2e PostScript options (cf. `LaTeX Companion' p.317):

% PS drivers:
\DeclareOption{dvips}{\xyoption{ps}\AtBeginDocument{\UsePSspecials{dvips}}}
\DeclareOption{dvitops}{\xyoption{ps}\AtBeginDocument{\UsePSspecials{dvitops}}}
\DeclareOption{oztex}{\xyoption{ps}\AtBeginDocument{\UsePSspecials{OzTeX}}}
\DeclareOption{textures}{\xyoption{ps}%
 \AtBeginDocument{\UsePSspecials{Textures}}}

% \usepackage options translate to XY-pic options:

% A few options should be activated in addition to loaded:
\DeclareOption{cmtip}{\xyoption{cmtip}\AtBeginDocument{\UseComputerModernTips}}

% Other options are just loaded.
\DeclareOption*{\edef\next{\noexpand\xyoption{\CurrentOption}}\next}

% Process the options!
\ProcessOptions

% ...and that is all.
\endinput

% $Log: xy.sty,v $
% Revision 2.12  1994/10/25  11:34:25  kris
% Interim release just before v3 [works with AMS-LaTeX 1.2]...
%
% Revision 2.9  1994/06/09  14:59:19  kris
% Release 3beta.
%
% Revision 2.8  1994/04/08  04:30:00  kris
% Second (bug fix) 3alpha release.
%
% Revision 2.7  1994/03/08  02:06:01  kris
% Release 3alpha.
%
% New for version 2.7.
